<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    setInterval(function () {
      var a = Math.ceil((Math.random() * 4039)).toString(16);
      var arr = ["0", "0"];
      arr.length = 3 - a.length;
      arr.push(a);
      document.body.style.backgroundColor = "#" + arr.join("");
    }, 1000);
  </script>
</body>

</html>